home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Development Platforms / Apple II / Essentials / Technical.Notes / SmPt / TN.SMPT.002 < prev    next >
Encoding:
Text File  |  1990-01-23  |  5.4 KB  |  121 lines  |  [TEXT/pdos]

  1. Apple II
  2. Technical Notes
  3. _____________________________________________________________________________
  4.                                                   Developer Technical Support
  5.  
  6.  
  7. SmartPort
  8. #2:    SmartPort Calls Updated
  9.  
  10. Revised by:    Llew Roberts                                    September 1989
  11. Written by:    Mike Askins                                           May 1985
  12.  
  13. This Technical Note documents SmartPort call information which is not found in 
  14. the descriptions of SmartPort in the Apple IIGS Firmware Reference and the 
  15. Apple IIc Technical Reference Manual, Second Edition.  The device-specific
  16. information which had been included in this Note is now found in these
  17. manuals.
  18. Changes since November 1988:  Added diagram and information on vendor ID 
  19. numbers.
  20. _____________________________________________________________________________
  21.  
  22.  
  23. STATUS Calls
  24.  
  25. A STATUS call with unit number = $00 and status code = $00 is a request to 
  26. return the status of the SmartPort host, as opposed to unit numbers greater 
  27. than zero which return the status of individual devices.  The number of 
  28. devices as well as the current interrupt status is returned.  The format of 
  29. the status list returned is illustrated in Figure 1.
  30.  
  31.            +------------------+
  32.     Byte 0 |   Device Count   |
  33.            +------------------+
  34.     Byte 1 | Interrupt Status |
  35.            +------------------+
  36.     Byte 2 |      Vendor      |   $0000          Vendor unknown
  37.            +                  +---$0001          Apple Computer, Inc.
  38.     Byte 3 |        ID        |   $0002-$FFFF    Third-Party Vendor
  39.            +------------------+
  40.     Byte 4 |    Interface     |   _____|___________________|_____
  41.            +                  +--|F|E|D|C|B|A|9|8|7|6|5|4|3|2|1|0|
  42.     Byte 5 |     Version      |  |_______|_______________|_______|
  43.            +------------------+  |       |               |
  44.     Byte 6 |    Reserved      |  |Major  |    Minor      |$A=Alpha
  45.            +------------------+  |Release|    Release    |$B=Beta
  46.     Byte 7 |    Reserved      |                          |$E=Experimental
  47.            +------------------+                          |$0=Final
  48.  
  49.                Figure 1-Host General Status Return Information
  50.  
  51. Stat_list    byte 0       Number of devices
  52.              byte 1       Interrupt Status (If bit 6 is set, then no interrupt)
  53.              bytes 2-3    Driver manufacturer (were Reserved prior to May
  54.                           1988):
  55.                           $0000          Undetermined
  56.                           $0001          Apple
  57.                           $0002-$FFFF    Third-party driver
  58.              bytes 4-5    Interface Version
  59.              bytes 6-7    Reserved (must be $0000)
  60.  
  61. The Number of devices byte tells the caller the total number of devices hooked 
  62. to this slot or port.
  63.  
  64. The Interrupt Status byte is used by programs which try to determine if the 
  65. SmartPort was the source of an interrupt.  If bit 6 of this byte is clear, 
  66. there is a device (or devices) in the chain that require interrupt service.  
  67. You cannot use this value to determine which device in the chain is actually 
  68. interrupting.  Your interrupt handler, having determined that a SmartPort 
  69. interrupt has occurred, must poll each device on the chain to find out which 
  70. device requires service.  The UniDisk 3.5 and Memory Expansion Card do not 
  71. generate interrupts, so in these cases, this byte has bit 6 set.
  72.  
  73. The vendor ID number may be used to determine the manufacturer of a specific 
  74. SmartPort peripheral interface card, a useful piece of information when 
  75. dealing with device-specific calls.  Contact Apple Developer Technical Support 
  76. if you require a specific vendor ID number.  The version word follows the 
  77. SmartPort Interface Version definition described later in this Note.
  78.  
  79.  
  80. CONTROL Codes
  81.  
  82. Before May 1988, control code $04 was defined as device-specific.  It is now 
  83. defined as EJECT, and all SmartPort devices which support removable media must 
  84. support this call.  If a device does not support removable media, it should 
  85. simply return from this call without an error.
  86.  
  87. Note that the Apple II SCSI card firmware was revised in early 1988 to support 
  88. this change.
  89.  
  90.  
  91. INIT
  92.  
  93. An application should never make an INIT call (SmartPort code $05), since 
  94. doing so is likely to destroy operating system integrity and may cause media 
  95. damage as well.
  96.  
  97. If you are writing your own operating system (not encouraged) and need to 
  98. reset all SmartPort devices, the INIT call with unit number = $00 will do just 
  99. that.  Note that SmartPort devices cannot be selectively reset, and INIT must 
  100. never be made at all with any unit number other than $00.
  101.  
  102.  
  103. SmartPort Interface Version Definition
  104.  
  105. The SmartPort Interface Version definition uses the most significant nibble of 
  106. the word as the major version number, the next two most significant nibbles as 
  107. the minor version number, and the least significant nibble as a release 
  108. indicator:
  109.  
  110.     $0 = Final    $A = Alpha    $B = Beta    $E = Experimental
  111.  
  112. Therefore, the interface version word for an experimental SmartPort interface 
  113. 1.15 would be $115E while the interface version word for SmartPort interface 
  114. 2.0 would be $2000.  GS/OS driver version numbers also follow this definition.
  115.  
  116.  
  117. Further Reference
  118. _____________________________________________________________________________
  119.   o  Apple IIGS Firmware Reference
  120.   o  Apple IIc Technical Reference Manual, Second Edition
  121.   o  Apple IIGS Technical Note #25, Apple IIGS Firmware Reference Updates